#include "Thread.hpp"

void Print()
{
    while(1)
    {
        cout << "我是一个线程..." << endl;
        sleep(1);
    }
}

int main()
{
    vector<Thread> threads;
    for (int i = 0; i < 10; i++)
    {
        threads.push_back(Thread(Print));
    }

    for (auto& t:threads)
    {
        t.run();
    }

    for (auto& t:threads)
    {
        t.join();
    }

    // Thread t(Print);
    // t.run();
    // cout << "线程名字: " << t.Name() << endl;
    // cout << "是否运行: " << t.IsRunning() << endl;
    // cout << "开始时间戳: " << t.StartTimeStamp() << endl;
    // t.join();



    return 0;
}